package com.example.zlw.dem3;

/**
 * @program: Zlw
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-11-04 20:57
 **/

import java.util.function.BiPredicate;

/**
 *对象方法引用形式练习
 */
public class Test {
    public static void main(String[] args) {
        //lambda形式
        //BiPredicate<String,String> biPredicate=(o1,o2)->{ return o1.equals(o2);};
        //对象方法引用形式
        BiPredicate<String,String> biPredicate=String::equals;
        String o1="嗨嗨嗨";
        String  o2="实习两年半练习生";
        System.out.println(biPredicate.test(o1, o2));
    }
}
